<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ include file="notice.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>显示的模版</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">  
 
	<link rel="stylesheet" type="text/css" href="<%=path%>/css/main.css">
	
	<script type="text/javascript" src="<%=path%>/js/main.js">
	</script>
	
	<script type="text/javascript">
		function sub(){
			document.getElementById("form").submit();
		}
		function del(_id){
			if(confirm("确认删除?")==1){
				location.replace("<%=basePath %>/SystemRoleAction.do?invoke=deleteRole&id="+_id);
			}
			return false;
		}
		function mod(_id){
			location.replace("<%=basePath %>/SystemRoleAction.do?invoke=editRole&id="+_id);
		}
	</script>
	
	
</HEAD>
<BODY style="BACKGROUND-POSITION-Y: -120px; BACKGROUND-IMAGE: url(../images/bg.gif); BACKGROUND-REPEAT: repeat-x">
 
<DIV>
  <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
      <TR   style="BACKGROUND-IMAGE: url(<%=path%>/images/bg_header.gif); BACKGROUND-REPEAT: repeat-x"   height=47>
        <TD width=10><SPAN     style="FLOAT: left; BACKGROUND-IMAGE: url(<%=path%>/images/main_hl.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
        <TD><SPAN      style="FLOAT: left; BACKGROUND-IMAGE: url(<%=path%>/images/main_hl2.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN><SPAN       style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FLOAT: left; BACKGROUND-IMAGE: url(<%=path%>/images/main_hb.gif); PADDING-BOTTOM: 10px; COLOR: white; PADDING-TOP: 10px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 47px; TEXT-ALIGN: center; 0px: ">角色列表 </SPAN><SPAN       style="FLOAT: left; BACKGROUND-IMAGE: url(<%=path%>/images/main_hr.gif); WIDTH: 60px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
       <TD     style="BACKGROUND-POSITION: 50% bottom; BACKGROUND-IMAGE: url(<%=path%>/images/main_rc.gif)" width=10></TD>
      </TR>
      <TR>
        <TD style="BACKGROUND-IMAGE: url(<%=path%>/images/main_ls.gif)">&nbsp;</TD>
        <TD  style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; COLOR: #566984; PADDING-TOP: 10px; BACKGROUND-COLOR: white"     vAlign=top align=middle>
          <DIV>
         
           <!-- 如果要更换内容，请把代码放到这里 -->
            <TABLE class=gridView id=ctl00_ContentPlaceHolder2_GridView1 style="WIDTH: 100%; BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all       border=1>
              <div>
	                <div style="float:left;"><input type="image" src="<%=path%>/images/addNote.gif" onclick="openWin('<%=path%>','','addRoles')"/>角色添加</div>
	              <form action="<%=basePath %>SystemRoleAction.do?invoke=selectRole" method="post" id="form" name="form">
	                <div style="float:right;">关键字：<input type="text" name="keyword" id="keyword"/><input type="image" src="<%=path%>/images/nav_search.gif"/></div>
	          	 </form>
	          </div>
              <TBODY>
                <TR>
                  <TH class=gridViewHeader style="WIDTH: 50px" scope=col>&nbsp;</TH>
                  <TH class=gridViewHeader scope=col>角色编号</TH>
                  <TH class=gridViewHeader scope=col>角色名称</TH>
                  <TH class=gridViewHeader scope=col>修改</TH>
                  <TH class=gridViewHeader scope=col>删除</TH>
                </TR>
                <%
                	List list=(List)session.getAttribute("retList");
                	System.out.println("list:"+list);
                	if(list!=null&&list.size()>0){
                 %>
                <c:forEach items="${retList}" var="r">
                	 <TR>
                  <TD class=gridViewItem style="WIDTH: 50px"><IMG 
            src="<%=path%>/images/bg_users.gif"> </TD>
                  <TD class=gridViewItem>${r.id}</TD>
                  <TD class=gridViewItem>${r.name}</TD>
                  <TD class=gridViewItem><A class=cmdField 
                  onclick="mod('${r.id}')";
            href="#">修改</A></TD>
                  <TD class=gridViewItem><A class=cmdField 
            id=ctl00_ContentPlaceHolder2_GridView1_ctl02_LinkButton1 
            onclick="del('${r.id}')" 
            href="javascript:__openWin('<%=basePath%>','${r.id}','deleteRole')">删除</A> </TD>
                </TR>
               </c:forEach>
               <% }else if(list!=null&&list.size()==0){%>
               		<TR align="center"><TD colspan="5">没有找到相关的记录<TD></TR>
                <% }%>
              </TBODY>
            </TABLE>
            
            
            
            <!-- 内容放到上面 
            <jsp:include page="dividePage.jsp"></jsp:include>
            -->
            
           
          </DIV>
        </TD>
        <TD style="BACKGROUND-IMAGE: url(<%=path%>/images/main_rs.gif)"></TD>
      </TR>
      <TR   style="BACKGROUND-IMAGE: url(<%=path%>/images/main_fs.gif); BACKGROUND-REPEAT: repeat-x" height=10>
        <TD style="BACKGROUND-IMAGE: url(<%=path%>/images/main_lf.gif)"></TD>
        <TD style="BACKGROUND-IMAGE: url(<%=path%>/images/main_fs.gif)"></TD>
        <TD style="BACKGROUND-IMAGE: url(<%=path%>/images/main_rf.gif)"></TD>
      </TR>
    </TBODY>
  </TABLE>
</DIV> 
</BODY>
</HTML>
